-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Speed up CircleCI by folding build workflow downstream #4426
Conversation
This reverts commit ead4161.
Codecov Report
@@ Coverage Diff @@
## master #4426 +/- ##
==========================================
+ Coverage 55.11% 55.20% +0.09%
==========================================
Files 397 397
Lines 50073 50073
==========================================
+ Hits 27598 27645 +47
+ Misses 20177 20142 -35
+ Partials 2298 2286 -12
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly not my final call, but I'm convinced this is better until/unless we drastically shrink the persisted workspace after an independent build.
And building is so fast that even if we do do that, this might be only only barely worse.
Verified: Looks good but for whatever reason all downstream tasks are faster in the new configuration than in the old although they make more work. So questionable. Shouldn't we run the new more times to collect more data ensure the deviation from 21m we see is low? |
the problem with this approach is that we are getting away from "build once, test/release many times". Now we will be building many times (which is not ideal) but ok. I'd rather look at what we are persisting and minimize that to what we actually need to persist. |
@algorandskiy Your observation is accurate though I think it can be explained. Here's a terse note, let me know if you'd like to discuss live.
@algorandskiy A few thoughts:
@algojack I think you're asking a question that the group needs to fundamentally weigh. A few thoughts from my perspective:
|
I think it's a mistake to think of CI as "release". It's just testing and the things that matter are speed, cost, and maintainability. I think this PR improves the situation in all three dimensions. It is demonstrably faster and cheaper, and is fewer lines and complexity in the .yml. The complexity of building in separate jobs, tied together by persisting specific items between the jobs was something we put up with because of the presumed advantages (in speed/cost) not something that was good for its own sake. |
That's actually why we should do it. The downstream jobs were wasting time re-attaching a huge workspace created by the build, even though they didn't need. (Especially, for example, the test verification jobs that take less than a second, but were spending a minute re-attaching the workspace) |
This time the slowest amd64 is again 20m so I guess I'm convinced. |
We want to have reproducible build and I believe "build once test many times" also. So to consider this as being the build we compare our releases to, is not a mistake in my opinion. |
not against this PR. Just wanted to discuss so that we are all aware of where we are headed with this. And we did discuss this on slack, so everyone seems to be ok with it. |
Proposes to speed up CircleCI builds by consolidating
build
workflow steps into downstream workflows.By only changing the CI architecture without modifying resource class + parallelism, we see the following change:
Feels like a win-win. The change saves money + saves time.
Details:
build
workflow spends >= 50% of its duration persisting to workspace (e.g. https://app.circleci.com/pipelines/github/algorand/go-algorand/8736/workflows/8dedb6dc-c5c4-4c6a-83e5-f01219396acc/jobs/158031). Since thebuild
workflow is a pre-requisite to all downstream workflows, the PR proposes parallelizing the build step by folding it into downstream workflows.